package lianxi;

import java.text.DecimalFormat;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2023-03-27
 * Time: 20:07
 */
public class Main6 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //在此输入您的代码...
        int n = sc.nextInt();
        int []arr = new int[n];

        double sum = 0;

        for(int i=0;i<n;i++){
            arr[i] = sc.nextInt();
        }
        int max = arr[0];
        int min = arr[0];
        for(int i=0;i<n;i++){
            if(arr[i] > max){
                max = arr[i];
            }
            if(arr[i] < min){
                min = arr[i];
            }
            sum += arr[i];
        }
        System.out.println(max);
        System.out.println(min);
        double avg = sum/n;
        DecimalFormat dc = new DecimalFormat("#.00");
        System.out.println( dc.format(avg));

        sc.close();
    }
}
